namespace RivercrabNet
{
    using System;
    using System.Drawing;

    public class UserDefinedTitle
    {
        private string displayTitle = string.Empty;
        private string field = string.Empty;
        private Brush fieldBrush = new SolidBrush(Color.White);
        private Color fieldColor = Color.White;
        private string targetShapeField = string.Empty;

        public UserDefinedTitle(string relateShapeField, string field, string displayTitle, Color fieldColor)
        {
            this.targetShapeField = relateShapeField;
            this.field = field;
            this.displayTitle = displayTitle;
            this.FieldColor = fieldColor;
        }

        ~UserDefinedTitle()
        {
            if (this.fieldBrush != null)
            {
                this.fieldBrush.Dispose();
            }
        }

        public string DisplayTitle
        {
            get
            {
                return this.displayTitle;
            }
            set
            {
                this.displayTitle = value;
            }
        }

        public string Field
        {
            get
            {
                return this.field;
            }
            set
            {
                this.field = value;
            }
        }

        public Brush FieldBrush
        {
            get
            {
                return this.fieldBrush;
            }
            set
            {
                this.fieldBrush = value;
            }
        }

        public Color FieldColor
        {
            get
            {
                return this.fieldColor;
            }
            set
            {
                this.fieldColor = value;
                if (this.fieldBrush != null)
                {
                    this.fieldBrush.Dispose();
                }
                this.fieldBrush = new SolidBrush(value);
            }
        }

        public string TargetShapeField
        {
            get
            {
                return this.targetShapeField;
            }
            set
            {
                this.targetShapeField = value;
            }
        }
    }
}

